"""
系统枚举定义
"""
from enum import Enum


class ComplexityLevel(str, Enum):
    """问题复杂度级别"""
    SIMPLE = "simple"
    MODERATE = "moderate"
    COMPLEX = "complex"


class QuestionCategory(str, Enum):
    """问题分类"""
    FACTUAL = "factual"              # 事实性问题
    ANALYTICAL = "analytical"        # 分析性问题
    CREATIVE = "creative"           # 创造性问题
    PROCEDURAL = "procedural"       # 程序性问题
    COMPARATIVE = "comparative"     # 比较性问题
    PREDICTIVE = "predictive"       # 预测性问题


class TaskType(str, Enum):
    """任务类型"""
    RESEARCH = "research"           # 研究任务
    ANALYSIS = "analysis"          # 分析任务
    SYNTHESIS = "synthesis"        # 综合任务
    GENERATION = "generation"      # 生成任务
    EVALUATION = "evaluation"      # 评估任务
    COMPARISON = "comparison"      # 比较任务


class ExecutionStatus(str, Enum):
    """执行状态"""
    PENDING = "pending"            # 等待中
    RUNNING = "running"            # 执行中
    COMPLETED = "completed"        # 已完成
    FAILED = "failed"              # 失败
    CANCELLED = "cancelled"        # 已取消


class TaskStatus(str, Enum):
    """任务状态"""
    PENDING = "pending"            # 等待执行
    RUNNING = "running"            # 执行中
    COMPLETED = "completed"        # 已完成
    FAILED = "failed"              # 失败
    SKIPPED = "skipped"            # 已跳过


class AICapability(str, Enum):
    """AI能力类型"""
    TEXT_GENERATION = "text_generation"     # 文本生成
    ANALYSIS = "analysis"                   # 分析能力
    REASONING = "reasoning"                 # 推理能力
    RESEARCH = "research"                   # 研究能力
    CREATIVITY = "creativity"               # 创造力
    TRANSLATION = "translation"             # 翻译能力


class ExecutionPath(str, Enum):
    """执行路径"""
    DIRECT = "direct"              # 直接执行（简单问题）
    TASK_BASED = "task_based"      # 基于任务的执行（复杂问题）


class ErrorType(str, Enum):
    """错误类型"""
    QUESTION_ANALYSIS_FAILED = "question_analysis_failed"
    TASK_GENERATION_FAILED = "task_generation_failed"
    AGENT_UNAVAILABLE = "agent_unavailable"
    EXECUTION_TIMEOUT = "execution_timeout"
    EXECUTION_FAILED = "execution_failed"
    VALIDATION_ERROR = "validation_error"
    API_ERROR = "api_error"


class SessionStatus(str, Enum):
    """会话状态"""
    CREATED = "created"            # 已创建
    ANALYZING = "analyzing"        # 分析中
    TASK_PLANNING = "task_planning"  # 任务规划中
    WAITING_CONFIRMATION = "waiting_confirmation"  # 等待确认
    EXECUTING = "executing"        # 执行中
    COMPLETED = "completed"        # 已完成
    FAILED = "failed"              # 失败
    CANCELLED = "cancelled"        # 已取消